package com.iting.test.controller;

import com.iting.test.service.AsyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author iting Nie
 * @version 1.1
 * @create 2022/2/11
 */
@Controller
@ResponseBody
public class AsyncController {
	@Autowired
	private AsyncService asyncService;
	@GetMapping("/async")
	public String async(){
		System.out.println(Thread.currentThread().getName());
		System.out.println("1");
		asyncService.asyncDemo();
		System.out.println("3");
		return "success";
	}


}
